-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make all-in-one.yaml file independant of sampling-strategies.json file #6431
Make all-in-one.yaml file independant of sampling-strategies.json file #6431
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- you are working off a stale
main
, please rebase. There should be no changes to submodules in your PR - you have not made any changes to the logic, so why are you sending this for review?
- you need to test that sampling endpoint returns expected stratery
$ curl "http://localhost:5778/?service=x"
{"strategyType":0,"probabilisticSampling":{"samplingRate":1}}%
d95c1a3
to
a884a32
Compare
Hi @yurishkuro,
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6431 +/- ##
==========================================
+ Coverage 96.25% 96.27% +0.02%
==========================================
Files 372 372
Lines 21276 21280 +4
==========================================
+ Hits 20479 20488 +9
+ Misses 609 605 -4
+ Partials 188 187 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
## Which problem is this PR solving? - Accidentally stumbled upon this when looking at #6431 - Turns out v2 config did not support all the options from v1 ## Description of the changes - Add support for reload interval ## How was this change tested? `go run ./cmd/jaeger` ``` $ curl "http://localhost:5778/?service=x" {"strategyType":0,"probabilisticSampling":{"samplingRate":1}}% ``` Edit cmd/jaeger/sampling-strategies.json to change default to 0.1. Observe server logs showing new values. ``` $ curl "http://localhost:5778/?service=x" {"strategyType":0,"probabilisticSampling":{"samplingRate":0.1}}% ``` --------- Signed-off-by: Yuri Shkuro <[email protected]> Signed-off-by: Yuri Shkuro <[email protected]>
The current default behavior is to return probability 1.0, not 0.001. There is a hardcoded constant |
make sure to pull from remote branch before you continue work, to pick up the changes I made |
Okay. So the initial issue regarding the dependancy of sampling-strategies.json file in all-in-one.yaml is resolved right? This is a new issue which needs to be solved? |
The original issue is not resolved since these changes return different results from what v2.1.0 Jaeger container returns. There is no need for any multiplier, the default probability should be made parameterizable via the provider API so that we can pass it from jaeger-v2 sampling extension (see #6441 for the pattern). |
bb1e6b0
to
8097990
Compare
@yurishkuro Please have a look once now.
Instead of
whch you wanted. I wanted to confirm what change I have to do to set this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove idl submodule change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on the right track
## Which problem is this PR solving? - Accidentally stumbled upon this when looking at jaegertracing#6431 - Turns out v2 config did not support all the options from v1 ## Description of the changes - Add support for reload interval ## How was this change tested? `go run ./cmd/jaeger` ``` $ curl "http://localhost:5778/?service=x" {"strategyType":0,"probabilisticSampling":{"samplingRate":1}}% ``` Edit cmd/jaeger/sampling-strategies.json to change default to 0.1. Observe server logs showing new values. ``` $ curl "http://localhost:5778/?service=x" {"strategyType":0,"probabilisticSampling":{"samplingRate":0.1}}% ``` --------- Signed-off-by: Yuri Shkuro <[email protected]> Signed-off-by: Yuri Shkuro <[email protected]>
@yurishkuro I have made the changes. Please have a look. |
please ensure all commits a signed. |
c0d6ee2
to
f0bdc32
Compare
Signed-off-by: adityachopra29 <[email protected]>
Signed-off-by: adityachopra29 <[email protected]>
Signed-off-by: adityachopra29 <[email protected]>
Signed-off-by: adityachopra29 <[email protected]>
Signed-off-by: adityachopra29 <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]> Signed-off-by: adityachopra29 <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]> Signed-off-by: adityachopra29 <[email protected]>
Signed-off-by: adityachopra29 <[email protected]>
Signed-off-by: adityachopra29 <[email protected]>
…s for the same. Signed-off-by: adityachopra29 <[email protected]>
…ptions' input from functions Signed-off-by: adityachopra29 <[email protected]>
f0bdc32
to
94314e3
Compare
@yurishkuro done .... some old commits were missing the signoff |
Signed-off-by: adityachopra29 <[email protected]>
f3b06fd
to
4f7bf95
Compare
@@ -30,7 +30,8 @@ extensions: | |||
remote_sampling: | |||
# We can either use file or adaptive sampling strategy in remote_sampling | |||
file: | |||
path: ./cmd/jaeger/sampling-strategies.json | |||
path: | |||
default_sampling_probability: 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense as a field at the top level? Right now we have file.default_sampling_probability
and adaptive.initial_sampling_probability
, but their meaning is very similar - which probability to return in the absence of any better information.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes ...it makes sense to remove redundancy. As I understand, this can have a drawback if the adaptive sampling probability is different from static samlping probability. (Just like right now, the defaultSamplingProbability was defined to be 0.001 as used by jaegerV1, but the initial_sampling_probability for adaptive sampling is given value 0.1 in yaml file).
Will this be an issue in the future or should I make the relevant changes?
jaegertracing#6431) ## Which problem is this PR solving? - fix jaegertracing#6338 ## Description of the changes - Removed the hardcoded path in the default configuration (all-in-one.yaml). - updated tests accordingly ## How was this change tested? - Since some of the tests are using hardcoded services in ```sampling-strategies.json``` (the service "foo"). https://github.com/jaegertracing/jaeger/blob/b02900cd99b38a79f70d9ba14f631307ded84764/cmd/jaeger/internal/extension/remotesampling/extension_test.go#L83 the ```sampling-strategies.json``` file could not be removed - Also, right now there are some tests, namely: 1.) TestServerHTTP_TracesRequest, 2.) all 3 tests in cmd/query/app which are not passing even on the main branch itself (according to me, otherwise I have made some mistake), and hence these same tests are not passing after I made my changes (my changes should not affect them anyway). ## Checklist - [X] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [X] I have signed all commits - [ ] I have added unit tests for the new functionality - [X] I have run lint and test steps successfully - for `jaeger`: `make lint test` - for `jaeger-ui`: `npm run lint` and `npm run test` --------- Signed-off-by: adityachopra29 <[email protected]> Signed-off-by: Yuri Shkuro <[email protected]> Co-authored-by: Yuri Shkuro <[email protected]> Co-authored-by: Yuri Shkuro <[email protected]>
Which problem is this PR solving?
Description of the changes
How was this change tested?
sampling-strategies.json
(the service "foo").jaeger/cmd/jaeger/internal/extension/remotesampling/extension_test.go
Line 83 in b02900c
the
sampling-strategies.json
file could not be removed1.) TestServerHTTP_TracesRequest,
2.) all 3 tests in cmd/query/app
which are not passing even on the main branch itself (according to me, otherwise I have made some mistake), and hence these same tests are not passing after I made my changes (my changes should not affect them anyway).
Checklist
jaeger
:make lint test
jaeger-ui
:npm run lint
andnpm run test